<?php 
namespace app\controllers;
use Yii;

class CommonController extends \yii\web\Controller
{
	protected function goReferrer($anchor = '')
    {
        return Yii::$app->getResponse()->redirect(Yii::$app->getRequest()->getReferrer() . $anchor);
    }
}